//
//  SFJumpWebViewController.m
//  GiftThat
//
//  Created by dllo on 16/1/9.
//  Copyright © 2016年 ChuXiang. All rights reserved.
//

#import "SFJumpWebViewController.h"

@interface SFJumpWebViewController ()
@property (nonatomic,strong) NSString *NewUrl;
@end

@implementation SFJumpWebViewController
- (instancetype)initWithURL:(NSString *)Url
{
    self = [super init];
    if (self) {
        self.NewUrl = Url;
      
    }
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    NSLog(@"aa%@",self.NewUrl);
     self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"back"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]style:UIBarButtonItemStyleDone target:self action:@selector(leftButton:)];
    NSURL *url = [NSURL URLWithString:self.NewUrl];
    NSURLRequest *request =[NSURLRequest requestWithURL:url];
    UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 50)];
    [webView loadRequest:request];
    [self.view addSubview:webView];
  
}
- (void)leftButton:(UIButton *)button {
  
    [self.navigationController popViewControllerAnimated:YES];

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
